package cn.wolfcode.luowowo.acticle.service.impl;

import cn.wolfcode.luowowo.acticle.domain.DestinationTheme;
import cn.wolfcode.luowowo.acticle.mapper.DestinationThemeMapper;
import cn.wolfcode.luowowo.acticle.query.DestinationThemeQueryObject;
import cn.wolfcode.luowowo.acticle.service.IDestinationService;
import cn.wolfcode.luowowo.acticle.service.IDestinationThemeService;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class DestinationThemeServiceImpl implements IDestinationThemeService {
    @Autowired
    private DestinationThemeMapper destinationThemeMapper;

    public PageInfo query(DestinationThemeQueryObject qo){
        PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
        List<DestinationTheme> list = destinationThemeMapper.selectForList(qo);
        return new PageInfo(list);
    }
}
